package com.yan.domain;

public class Circle {
    private double r;

    public Circle(double r) {
        this.r = r;
    }

    public Circle() {
    }

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public void showArea(){
        System.out.println("圆形面积为:" + (Math.PI * r * r));
    }

    public void showPerimeter(){
        System.out.println("圆的周长为:" + (2 * Math.PI * r));
    }

}
